{% extends "forum_base.html" %}{% load i18n %}

{% block title %}{% trans "Forums" %}{% endblock %}

{% block extrahead %}
<link rel="alternate" type="application/rss+xml" title="All Latest Posts via RSS" href="{% url forum_index %}rss/" />
<link rel="alternate" type="application/atom+xml" title="All Latest Posts via ATOM" href="{% url forum_index %}atom/" />
{% endblock %}


{% block js.custom %}
	<script type="text/javascript" language="javascript" src="{{ MEDIA_URL }}js/common.js"></script>
{% endblock js.custom %}

{% block content %}

<div class="float_left" style="display:block;width: 240px;">

    <span><a href="/forum/"><b>论坛</b></a><br />
    <a href="/search/?time=all" target="_blank">查看新帖</a> | <a href="#" >热门话题</a> | <a href="#" >发帖排行</a> | <a href="#" >会员花名册</a>
    </span>

</div>

	
<div  class="float_right" >

	今日:11 | 昨日:482 | 最高日:1953 | 
	<a href="sign">标记已读</a> | <a href="search/?digest=1" target="_blank">精华区</a> | <a href="rss/" target="_blank" title="RSS订阅本版面最新帖子"><img src="{{MEDIA_URL}}images/icon_feed.gif" /></a>
	<div>话题:29054 | 帖子:150302 | 删帖:13 |  会员总数:20709 | {% trans "newbie" %}:<a href="/accounts/profile/{{master}}" target="_blank">pqrs009</a> | 今注册 12 名</div>
	目前有{% trans "boy" %}:<img src="{{MEDIA_URL}}images/forum/online_boy.gif" alt="{% trans "boy" %}"> <font color="green"></font>名，{% trans "girl" %}:<img src="{{MEDIA_URL}}images/forum/online_girl.gif" alt="{% trans "girl" %}"> <font color="green"></font>名，不明性别：<img src="{{MEDIA_URL}}images/forum/online_unkown.gif" alt="不明性别">名
</div>
	
<div class="clear"></div>

{{ user.groups.all }}

{% if request.user.is_authenticated %}<p><a href="{% url forum_subscriptions %}">{% trans "Update Subscriptions" %}</a></p>{% endif %}
{% endblock content%}

{% block extended_content %}
{% endblock extended_content%}



{% block extended_page %}
{% if object_list %}
{% for forum in object_list %}
<div id="extended" class="pagewrapper"><!--begin:extended_page-->
    <div class="box-top"><h1> <a href="{{ forum.get_absolute_url }}" title="{{ forum.description }}">{{ forum.title }}</a> </h1></div>
        <div class="box link_content">
            
		<table class="data">
			<tr>
			  <th scope="col" width="50%">版块</th>
			  <th scope="col" width="15%">话题/帖子</th>
			  <th scope="col" width="35%">最后发表</th>
			</tr>
			{% with forum.get_all_children as rootforums%}
			{% for subforum in rootforums %}
			<tbody>
			    <tr>
			        <td>
                        <dl>
                            <dt>
                                <a href="{{ subforum.get_absolute_url }}">{{ subforum.title }}</a> 
                                (<img src="{{ MEDIA_URL }}images/forum/icon_new.gif" alt="今日发表"/> <strong>{{ subforum.get_posts_on_today }}</strong> 
                                 <img src="{{ MEDIA_URL }}images/forum/icon_user.gif" alt="当前在线"/> <strong>{{ subforum.get_users_on_today }}0</strong> ) 
                            </dt>
                            <dd>
                                <p>{{ subforum.description }}</p>
                                <p>版主:{% with subforum.get_master_list as ms%}{% for master in ms %}<a class="notabs" href="/accounts/profile/{{master}}">{{master}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}{% endwith %} </p>
                                <p>访问权限:{% with subforum.get_groups as subforumgroups%}
                                {% if subforumgroups %}{%for forumgroup in subforumgroups%}{{forumgroup}} {% endfor %}{% else %}匿名用户{% endif %}
                                {% endwith %} 可访问</p>
                            </dd>
                        </dl>
                    </td>
                    <td>
                        {% blocktrans with subforum.threads as thread_count and subforum.posts as post_count %}
                        <p class="nums bg_blue">{{ thread_count }}/{{ post_count }}</p>
                        {% endblocktrans %}
                    </td>
                    <td>
                        {% with subforum.forum_latest_post as latest_post %}
                        {% if latest_post %}<a href="{{ latest_post.get_absolute_url }}">{% trans "Re:" %}{{ latest_post.thread|truncatewords:6 }}</a>
                    	<cite>by <a href="/accounts/profile/{{ latest_post.author }}">{{ latest_post.author }}</a> <br/>-发表于 {{ latest_post.time|timesince }}前</cite>{% else %}{% trans "No Posts" %}{% endif %}
                        {% endwith %}
                    </td>
                </tr>
            </tbody>
			{% endfor %}{% endwith %}            
		  
		</table>
		   
		  
        <div class="clear"></div>
    </div>
    <div class="box-bot"><span></span></div>
</div><!--end:extended_page-->
{%comment%}
<div id="ad_text" class="pagewrapper"><!--begin:extended_page-->
    <div class="box-top"><h1> 下一屏内容 </h1></div>
        <div class="box">
            放点小广告什么的。
            <div class="clear"></div>
        </div>
    <div class="box-bot"><span></span></div>
</div><!--end:extended_page-->
{%endcomment%}

{% endfor %}
{% else %}
<div id="info" class="pagewrapper"><!--begin:extended_page-->
    <div class="box-top"><h1> 权限不足 </h1></div>
    <div class="box">
        <p class="red">您当前所在用户组的权限，不足以浏览本站论坛的任何版块。请登录或者注册本站帐户之后再来访问。</p>
        <div class="clear"></div>
    </div>
    <div class="box-bot"><span></span></div>
</div><!--end:extended_page-->

{% endif %}


<div id="forumlinks" class="pagewrapper"><!--begin:extended_page-->
    <div class="box-top"><h1><span><a href="{% url link_index %}" title="网址链接">更多...</a></span>  友情链接 </h1></div>
    <div class="box link_content">
        <ul>{% for link in links %}
	        <li><a href="{{ link.url }}" title='{{link.notes}}'>{{ link.title }}</a></li>{% endfor %}
	        <li><a href="#" target="_blank">联盟论坛</a> </li>
	    <li><a href="#" target="_blank">联盟论坛</a></li>
	    <li><a href="#" target="_blank">申请友情链接</a> </li>
        </ul>
        <div class="clear"></div>
    </div>
    <div class="box-bot"><span></span></div>
</div><!--end:extended_page-->


<div id="online" class="pagewrapper"><!--begin:extended_page-->
    <div class="box-top"><h1> 在线统计 </h1></div>
    <div class="box">当前
        - <em>15</em> 人在线
        - <em>15</em> 会员(<em>0</em> 隐身),
        - <em>0</em> 位游客
        - 最高记录是 <em>27</em> 于 <em>2008-11-18</em>.
        <div class="clear"></div>
    </div>
    <div class="box-bot"><span></span></div>
</div><!--end:extended_page-->
<div id="ad_text"></div>
{% endblock extended_page %}
